package com.smooth.dao.gen;

import com.smooth.dao.gen.bean.BizCompany;
import com.smooth.dao.gen.bean.BizCompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface BizCompanyMapper {
    /** biz_company */
    @SelectProvider(type=BizCompanySqlProvider.class, method="countByExample")
    long countByExample(BizCompanyExample example);

    /** biz_company */
    @DeleteProvider(type=BizCompanySqlProvider.class, method="deleteByExample")
    int deleteByExample(BizCompanyExample example);

    /** biz_company */
    @Delete({
        "delete from biz_company",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String id);

    /** biz_company */
    @Insert({
        "insert into biz_company (id, account_no, ",
        "comp_name, scale, ",
        "nature, comp_pic, ",
        "comp_pics, job_count, ",
        "job_all, job_shengyu, ",
        "job_flag, zhusu_pics, ",
        "percent, comp_address, ",
        "comp_license_pic, contact_name, ",
        "category_id, category_name, ",
        "contact_tel_no, password, ",
        "contact_job, province_id, ",
        "province_name, city_id, ",
        "city_name, area_id, ",
        "area_name, detail, ",
        "jiaban_type, jiaban_fee, ",
        "job_time, create_date, ",
        "update_date)",
        "values (#{id,jdbcType=VARCHAR}, #{accountNo,jdbcType=VARCHAR}, ",
        "#{compName,jdbcType=VARCHAR}, #{scale,jdbcType=INTEGER}, ",
        "#{nature,jdbcType=INTEGER}, #{compPic,jdbcType=VARCHAR}, ",
        "#{compPics,jdbcType=LONGVARCHAR}, #{jobCount,jdbcType=INTEGER}, ",
        "#{jobAll,jdbcType=INTEGER}, #{jobShengyu,jdbcType=INTEGER}, ",
        "#{jobFlag,jdbcType=SMALLINT}, #{zhusuPics,jdbcType=LONGVARCHAR}, ",
        "#{percent,jdbcType=DOUBLE}, #{compAddress,jdbcType=VARCHAR}, ",
        "#{compLicensePic,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, ",
        "#{categoryId,jdbcType=VARCHAR}, #{categoryName,jdbcType=VARCHAR}, ",
        "#{contactTelNo,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, ",
        "#{contactJob,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR}, ",
        "#{provinceName,jdbcType=VARCHAR}, #{cityId,jdbcType=VARCHAR}, ",
        "#{cityName,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR}, ",
        "#{areaName,jdbcType=VARCHAR}, #{detail,jdbcType=LONGVARCHAR}, ",
        "#{jiabanType,jdbcType=SMALLINT}, #{jiabanFee,jdbcType=SMALLINT}, ",
        "#{jobTime,jdbcType=SMALLINT}, #{createDate,jdbcType=TIMESTAMP}, ",
        "#{updateDate,jdbcType=TIMESTAMP})"
    })
    int insert(BizCompany record);

    /** biz_company */
    @InsertProvider(type=BizCompanySqlProvider.class, method="insertSelective")
    int insertSelective(BizCompany record);

    /** biz_company */
    @SelectProvider(type=BizCompanySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="account_no", property="accountNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_name", property="compName", jdbcType=JdbcType.VARCHAR),
        @Result(column="scale", property="scale", jdbcType=JdbcType.INTEGER),
        @Result(column="nature", property="nature", jdbcType=JdbcType.INTEGER),
        @Result(column="comp_pic", property="compPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_pics", property="compPics", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="job_count", property="jobCount", jdbcType=JdbcType.INTEGER),
        @Result(column="job_all", property="jobAll", jdbcType=JdbcType.INTEGER),
        @Result(column="job_shengyu", property="jobShengyu", jdbcType=JdbcType.INTEGER),
        @Result(column="job_flag", property="jobFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="zhusu_pics", property="zhusuPics", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="percent", property="percent", jdbcType=JdbcType.DOUBLE),
        @Result(column="comp_address", property="compAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_license_pic", property="compLicensePic", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_id", property="categoryId", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_tel_no", property="contactTelNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_job", property="contactJob", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_id", property="cityId", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_id", property="areaId", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR),
        @Result(column="detail", property="detail", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="jiaban_type", property="jiabanType", jdbcType=JdbcType.SMALLINT),
        @Result(column="jiaban_fee", property="jiabanFee", jdbcType=JdbcType.SMALLINT),
        @Result(column="job_time", property="jobTime", jdbcType=JdbcType.SMALLINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    List<BizCompany> selectByExample(BizCompanyExample example);

    /** biz_company */
    @Select({
        "select",
        "id, account_no, comp_name, scale, nature, comp_pic, comp_pics, job_count, job_all, ",
        "job_shengyu, job_flag, zhusu_pics, percent, comp_address, comp_license_pic, ",
        "contact_name, category_id, category_name, contact_tel_no, password, contact_job, ",
        "province_id, province_name, city_id, city_name, area_id, area_name, detail, ",
        "jiaban_type, jiaban_fee, job_time, create_date, update_date",
        "from biz_company",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="account_no", property="accountNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_name", property="compName", jdbcType=JdbcType.VARCHAR),
        @Result(column="scale", property="scale", jdbcType=JdbcType.INTEGER),
        @Result(column="nature", property="nature", jdbcType=JdbcType.INTEGER),
        @Result(column="comp_pic", property="compPic", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_pics", property="compPics", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="job_count", property="jobCount", jdbcType=JdbcType.INTEGER),
        @Result(column="job_all", property="jobAll", jdbcType=JdbcType.INTEGER),
        @Result(column="job_shengyu", property="jobShengyu", jdbcType=JdbcType.INTEGER),
        @Result(column="job_flag", property="jobFlag", jdbcType=JdbcType.SMALLINT),
        @Result(column="zhusu_pics", property="zhusuPics", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="percent", property="percent", jdbcType=JdbcType.DOUBLE),
        @Result(column="comp_address", property="compAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="comp_license_pic", property="compLicensePic", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_id", property="categoryId", jdbcType=JdbcType.VARCHAR),
        @Result(column="category_name", property="categoryName", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_tel_no", property="contactTelNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="password", property="password", jdbcType=JdbcType.VARCHAR),
        @Result(column="contact_job", property="contactJob", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_id", property="provinceId", jdbcType=JdbcType.VARCHAR),
        @Result(column="province_name", property="provinceName", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_id", property="cityId", jdbcType=JdbcType.VARCHAR),
        @Result(column="city_name", property="cityName", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_id", property="areaId", jdbcType=JdbcType.VARCHAR),
        @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR),
        @Result(column="detail", property="detail", jdbcType=JdbcType.LONGVARCHAR),
        @Result(column="jiaban_type", property="jiabanType", jdbcType=JdbcType.SMALLINT),
        @Result(column="jiaban_fee", property="jiabanFee", jdbcType=JdbcType.SMALLINT),
        @Result(column="job_time", property="jobTime", jdbcType=JdbcType.SMALLINT),
        @Result(column="create_date", property="createDate", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_date", property="updateDate", jdbcType=JdbcType.TIMESTAMP)
    })
    BizCompany selectByPrimaryKey(String id);

    /** biz_company */
    @UpdateProvider(type=BizCompanySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BizCompany record, @Param("example") BizCompanyExample example);

    /** biz_company */
    @UpdateProvider(type=BizCompanySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BizCompany record, @Param("example") BizCompanyExample example);

    /** biz_company */
    @UpdateProvider(type=BizCompanySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BizCompany record);

    /** biz_company */
    @Update({
        "update biz_company",
        "set account_no = #{accountNo,jdbcType=VARCHAR},",
          "comp_name = #{compName,jdbcType=VARCHAR},",
          "scale = #{scale,jdbcType=INTEGER},",
          "nature = #{nature,jdbcType=INTEGER},",
          "comp_pic = #{compPic,jdbcType=VARCHAR},",
          "comp_pics = #{compPics,jdbcType=LONGVARCHAR},",
          "job_count = #{jobCount,jdbcType=INTEGER},",
          "job_all = #{jobAll,jdbcType=INTEGER},",
          "job_shengyu = #{jobShengyu,jdbcType=INTEGER},",
          "job_flag = #{jobFlag,jdbcType=SMALLINT},",
          "zhusu_pics = #{zhusuPics,jdbcType=LONGVARCHAR},",
          "percent = #{percent,jdbcType=DOUBLE},",
          "comp_address = #{compAddress,jdbcType=VARCHAR},",
          "comp_license_pic = #{compLicensePic,jdbcType=VARCHAR},",
          "contact_name = #{contactName,jdbcType=VARCHAR},",
          "category_id = #{categoryId,jdbcType=VARCHAR},",
          "category_name = #{categoryName,jdbcType=VARCHAR},",
          "contact_tel_no = #{contactTelNo,jdbcType=VARCHAR},",
          "password = #{password,jdbcType=VARCHAR},",
          "contact_job = #{contactJob,jdbcType=VARCHAR},",
          "province_id = #{provinceId,jdbcType=VARCHAR},",
          "province_name = #{provinceName,jdbcType=VARCHAR},",
          "city_id = #{cityId,jdbcType=VARCHAR},",
          "city_name = #{cityName,jdbcType=VARCHAR},",
          "area_id = #{areaId,jdbcType=VARCHAR},",
          "area_name = #{areaName,jdbcType=VARCHAR},",
          "detail = #{detail,jdbcType=LONGVARCHAR},",
          "jiaban_type = #{jiabanType,jdbcType=SMALLINT},",
          "jiaban_fee = #{jiabanFee,jdbcType=SMALLINT},",
          "job_time = #{jobTime,jdbcType=SMALLINT},",
          "create_date = #{createDate,jdbcType=TIMESTAMP},",
          "update_date = #{updateDate,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(BizCompany record);
}